<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use DB;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $gresult=DB::table('goods')->get();
        $cresult=DB::table('category')
        ->select('cid','cname')
        ->where('level','1')
        ->get();
        //dd($cresult);
        return view('/Home/Index',['cresult'=>$cresult]);
    }

    
}
